<template>
  <div class="header">
    <my-header :is-active="sidebar.opened" class="header-container" @toggleClick="toggleSideBar" />
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import myHeader from "@/components/Header";

export default {
  components: {
    myHeader
  },
  computed: {
    ...mapGetters(["sidebar"])
  },
  methods: {
    toggleSideBar() {
      this.$store.dispatch("app/toggleSideBar");
    }
  }
};
</script>

<style lang="scss" scoped>
.header {
  // height: 50px;
  overflow: hidden;
  position: relative;
  background: #409eff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);

  .header-container {
    line-height: 46px;
    height: 100%;
    float: left;
    cursor: pointer;
    transition: background 0.3s;
    -webkit-tap-highlight-color: transparent;

    &:hover {
      background: rgba(0, 0, 0, 0.025);
    }
  }
}
</style>

<style scoped>
</style>